
let xData = ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月']

let yData = [120, 200, 150, 80, 70, 110, 130, 120, 200, 150, 80, 70]
export default {
  option: {
    title: {
      text: "2023年度废料数据分析",
      left: "center",
      top: '20',
      textStyle: {
        fontWeight: "normal",
        fontSize: 14,
        padding: [0, 0, 5, 3],
        color: "#d55e09",
        textShadowBlur: 5
      }
    },
    grid: {
      top: '24%',
      left: '5%',
      right: '5%',
      bottom: '5%',
      containLabel: true,
    },
    xAxis: {
      type: 'category',
      data: xData,
      axisLabel: { interval: 0 },
      axisLine: {
        show: false,
      },
      axisTick: { show: false },
    },
    yAxis: {
      type: 'value',
      axisLine: {
        show: false,
      },
      splitLine: {
        show: true,
        lineStyle: {
          color: 'rgba(4, 187, 255, .2)',
          type: 'dashed'
        }
      },
      axisLabel: {
        textStyle: {
          fontSize: '12px'
        }
      },
      axisTick: {
        show: false
      }
    },
    series: [
      {
        data: [],
        type: 'bar',
        barWidth: 20,
        barGap: '25%',
        // 假设的y轴
        label: {
          show: true,
          // 文字颜色
          color: '#d55e09',
          position: 'top',
          formatter: '{c}',
          fontSize: 12,
        },
        itemStyle: {
          borderRadius: 10,
          color: {
            x: 0,
            y: 0,
            x2: 0,
            y2: 1,
            type: 'linear',
            global: false,
            colorStops: [
              { offset: 0, color: 'rgba(213, 93, 9, 1)' },
              { offset: 1, color: 'rgba(255, 145, 0, 0)' },
            ],
          },
        },
      },
    ],
  }
}
